class Profile < ActiveRecord::Base

    attr_accessible :profile, :username, :password, :domain, :exts, :ignore_exts, :dirs, :ignore_dirs, :regex, :path, :delaytime, :description, :debug, :concurrent, :creditcards, :zipfiles, :memory, :mask, :ignore_dbs, :dbs, :ignore_tables, :tables, :ignore_columns, :columns, :rows, :scantype

    validates_presence_of :profile, :domain, :regex, :scantype

    scope :windows_agent, where("profiles.scantype LIKE 'win_agent'")
    scope :windows_agentless, where("profiles.scantype LIKE 'win_agentless' OR profiles.scantype LIKE 'win_share'")
    scope :unix_agentless, where("profiles.scantype LIKE 'unix_agentless'")
    scope :database_agentless, where("profiles.scantype LIKE 'mssql_agentless' OR profiles.scantype LIKE 'mysql_agentless' OR profiles.scantype LIKE 'postgresql_agentless'")
end
